home *** CD-ROM | disk | FTP | other *** search
/ The Programmer Disk / The Programmer Disk (Microforum).iso / xpro / c4 / pro20 / omakefil < prev    next >
Text File  |  1990-05-31  |  11KB  |  210 lines

  1. # Makefile for pbmplus tools.
  2. #
  3. # Copyright (C) 1989 by Jef Poskanzer.
  4. #
  5. # Permission to use, copy, modify, and distribute this software and its
  6. # documentation for any purpose and without fee is hereby granted, provided
  7. # that the above copyright notice appear in all copies and that both that
  8. # copyright notice and this permission notice appear in supporting
  9. # documentation.  This software is provided "as is" without express or
  10. # implied warranty.
  11.  
  12. # CONFIGURE: define which of the four sub-packages you want to make.  PBM
  13. # is required; PNM is recommended; and if you want PPM you must have PGM
  14. # too.  This means there are only six possibilities:
  15. SUBDIRS =    pbm pgm ppm pnm
  16. # SUBDIRS =    pbm pgm ppm
  17. # SUBDIRS =    pbm pgm pnm
  18. # SUBDIRS =    pbm pgm
  19. # SUBDIRS =    pbm pnm
  20. # SUBDIRS =    pbm
  21.  
  22. # CONFIGURE: gcc makes things go about 20% faster, but not everyone has it.
  23. # Warning: do not use gcc's -finline-functions or -fstrength-reduce flags,
  24. # they can produce incorrect code.  (This is with gcc version 1.35, later
  25. # versions may fix these bugs.)
  26. # CC =        cc
  27. CC =        gcc -fcombine-regs
  28.  
  29. # CONFIGURE: cc flags go here.
  30. # CFLAGS =    -g
  31. CFLAGS =    -O
  32. # CFLAGS =    -g -O
  33.  
  34. # CONFIGURE: ld flags go here.
  35. LDFLAGS =    -s
  36. # LDFLAGS =    
  37.  
  38. # CONFIGURE: Define the directory that you want the binaries copied to.
  39. INSTALLBINARIES =    /usr/new/pbm
  40.  
  41. # CONFIGURE: Define the directories that you want the manual sources copied to.
  42. INSTALLMANUALS1 =    /usr/man/mann
  43. INSTALLMANUALS3 =    /usr/man/mann
  44. INSTALLMANUALS5 =    /usr/man/mann
  45.  
  46. SHELL =        /bin/sh
  47.  
  48. all:
  49.     for i in $(SUBDIRS) ; do \
  50.         ( cd $$i ; make $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' 'INSTALLMANUALS1=$(INSTALLMANUALS1)' 'INSTALLMANUALS3=$(INSTALLMANUALS3)' 'INSTALLMANUALS5=$(INSTALLMANUALS5)' all ); \
  51.     done
  52.  
  53. install:
  54.     for i in $(SUBDIRS) ; do \
  55.         ( cd $$i ; make $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' 'INSTALLMANUALS1=$(INSTALLMANUALS1)' 'INSTALLMANUALS3=$(INSTALLMANUALS3)' 'INSTALLMANUALS5=$(INSTALLMANUALS5)' install ); \
  56.     done
  57.  
  58. installbinaries:
  59.     for i in $(SUBDIRS) ; do \
  60.         ( cd $$i ; make $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' installbinaries ); \
  61.     done
  62.  
  63. installmanuals:
  64.     for i in $(SUBDIRS) ; do \
  65.         ( cd $$i ; make $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLMANUALS1=$(INSTALLMANUALS1)' 'INSTALLMANUALS3=$(INSTALLMANUALS3)' 'INSTALLMANUALS5=$(INSTALLMANUALS5)' installmanuals ); \
  66.     done
  67.  
  68. clean:
  69.     -rm -f *.shar*
  70.     for i in $(SUBDIRS) ; do \
  71.         ( cd $$i ; make $(MFLAGS) clean ); \
  72.     done
  73.  
  74.  
  75. # Sharchive stuff.
  76.  
  77. shar:        pbmplus.shar pbm.shar pgm.shar ppm.shar pnm.shar
  78.  
  79. pbmplus.shar:    README CHANGES FORMATS OTHER.SYSTEMS TIPS Imakefile \
  80.         pbmplus.h compataliases
  81.     shar -v -c -p X README CHANGES FORMATS OTHER.SYSTEMS TIPS Makefile Imakefile pbmplus.h compataliases > $@
  82.  
  83. pbm.shar:    pbm.shar1 pbm.shar2 pbm.shar3 pbm.shar4 pbm.shar5 pbm.shar6
  84. pbm.shar1:    pbm/Makefile pbm/Imakefile pbm/pbm.h pbm/icontopbm.c \
  85.         pbm/icontopbm.1 pbm/macptopbm.c pbm/macptopbm.1 \
  86.         pbm/rasttopbm.c pbm/rasttopbm.1 pbm/xbmtopbm.c \
  87.         pbm/xbmtopbm.1 pbm/xwdtopbm.c
  88.     shar -v -c -p X pbm/Makefile pbm/Imakefile pbm/pbm.h pbm/icontopbm.c pbm/icontopbm.1 pbm/macptopbm.c pbm/macptopbm.1 pbm/rasttopbm.c pbm/rasttopbm.1 pbm/xbmtopbm.c pbm/xbmtopbm.1 pbm/xwdtopbm.c > $@
  89. pbm.shar2:    pbm/xwdtopbm.1 pbm/pbmtoicon.c pbm/pbmtoicon.1 \
  90.         pbm/pbmtoptx.c pbm/pbmtoptx.1 pbm/pbmtorast.c pbm/pbmtorast.1 \
  91.         pbm/pbmtoxbm.c pbm/pbmtoxbm.1 pbm/pbmtox10bm.c \
  92.         pbm/pbmtox10bm.1 pbm/pbmtoascii.c pbm/pbmtoascii.1 \
  93.         pbm/pbmpaste.c pbm/pbmpaste.1 pbm/g3topbm.c pbm/g3topbm.1
  94.     shar -v -c -p X pbm/xwdtopbm.1 pbm/pbmtoicon.c pbm/pbmtoicon.1 pbm/pbmtoptx.c pbm/pbmtoptx.1 pbm/pbmtorast.c pbm/pbmtorast.1 pbm/pbmtoxbm.c pbm/pbmtoxbm.1 pbm/pbmtox10bm.c pbm/pbmtox10bm.1 pbm/pbmtoascii.c pbm/pbmtoascii.1 pbm/pbmpaste.c pbm/pbmpaste.1 pbm/g3topbm.c pbm/g3topbm.1 > $@
  95. pbm.shar3:    pbm/pbmmake.c pbm/pbmmake.1 pbm/pbmtolj.c \
  96.         pbm/pbmtolj.1 pbm/pbmtomacp.c pbm/pbmtomacp.1 \
  97.         pbm/pbmtoxwd.c pbm/g3.h pbm/pbmtog3.c pbm/pbmtog3.1 \
  98.         pbm/pbmtoxwd.1 pbm/brushtopbm.c pbm/brushtopbm.1 \
  99.         pbm/mgrtopbm.c pbm/mgrtopbm.1
  100.     shar -v -c -p X pbm/pbmmake.c pbm/pbmmake.1 pbm/pbmtolj.c pbm/pbmtolj.1 pbm/pbmtomacp.c pbm/pbmtomacp.1 pbm/pbmtoxwd.c pbm/g3.h pbm/pbmtog3.c pbm/pbmtog3.1 pbm/pbmtoxwd.1 pbm/brushtopbm.c pbm/brushtopbm.1 pbm/mgrtopbm.c pbm/mgrtopbm.1 > $@
  101. pbm.shar4:    pbm/pbm.5 pbm/libpbm.3 pbm/libpbm.h pbm/macp.h pbm/x10wd.h \
  102.         pbm/x11wd.h pbm/bitreverse.h pbm/pbmreduce.c \
  103.         pbm/pbmreduce.1 pbm/gemtopbm.c pbm/gemtopbm.1 pbm/pbmtogo.c \
  104.         pbm/pbmtogo.1 pbm/pbmlife.c pbm/pbmlife.1 pbm/pcxtopbm.c
  105.     shar -v -c -p X pbm/pbm.5 pbm/libpbm.3 pbm/libpbm.h pbm/macp.h pbm/x10wd.h pbm/x11wd.h pbm/bitreverse.h pbm/pbmreduce.c pbm/pbmreduce.1 pbm/gemtopbm.c pbm/gemtopbm.1 pbm/pbmtogo.c pbm/pbmtogo.1 pbm/pbmlife.c pbm/pbmlife.1 pbm/pcxtopbm.c > $@
  106. pbm.shar5:    pbm/pcxtopbm.1 pbm/pbmupc.c pbm/pbmupc.1 pbm/mgr.h \
  107.         pbm/libpbm1.c pbm/libpbm2.c pbm/libpbm3.c pbm/libpbm4.c \
  108.         pbm/libpbm5.c
  109.     shar -v -c -p X pbm/pcxtopbm.1 pbm/pbmupc.c pbm/pbmupc.1 pbm/mgr.h pbm/libpbm1.c pbm/libpbm2.c pbm/libpbm3.c pbm/libpbm4.c pbm/libpbm5.c > $@
  110. pbm.shar6:    pbm/cmuwm.h pbm/cmuwmtopbm.c pbm/cmuwmtopbm.1 \
  111.         pbm/pbmtocmuwm.c pbm/pbmtocmuwm.1 pbm/pbmmask.c pbm/pbmmask.1 \
  112.         pbm/pbmtobbnbg.c pbm/pbmtobbnbg.1 pbm/pbmtomgr.c \
  113.         pbm/pbmtomgr.1 pbm/pict.h pbm/picttopbm.c pbm/picttopbm.1 \
  114.         pbm/rast.h
  115.     shar -v -c -p X pbm/cmuwm.h pbm/cmuwmtopbm.c pbm/cmuwmtopbm.1 pbm/pbmtocmuwm.c pbm/pbmtocmuwm.1 pbm/pbmmask.c pbm/pbmmask.1 pbm/pbmtobbnbg.c pbm/pbmtobbnbg.1 pbm/pbmtomgr.c pbm/pbmtomgr.1 pbm/pict.h pbm/picttopbm.c pbm/picttopbm.1 pbm/rast.h > $@
  116.  
  117. pgm.shar:    pgm.shar1 pgm.shar2 pgm.shar3
  118. pgm.shar1:    pgm/Makefile pgm/Imakefile pgm/pgm.5 pgm/libpgm.3 \
  119.         pgm/libpgm1.c pgm/libpgm2.c pgm/pgm.h pgm/libpgm.h \
  120.         pgm/fstopgm.c pgm/fstopgm.1 pgm/hipstopgm.c pgm/hipstopgm.1 \
  121.         pgm/pgmenhance.c pgm/pgmenhance.1
  122.     shar -v -c -p X pgm/Makefile pgm/Imakefile pgm/pgm.5 pgm/libpgm.3 pgm/libpgm1.c pgm/libpgm2.c pgm/pgm.h pgm/libpgm.h pgm/fstopgm.c pgm/fstopgm.1 pgm/hipstopgm.c pgm/hipstopgm.1 pgm/pgmenhance.c pgm/pgmenhance.1 > $@
  123. pgm.shar2:    pgm/pgmtopbm.c pgm/pgmtopbm.1 pgm/dithers.h pgm/tiff.h \
  124.         pgm/pgmtops.c pgm/pgmtops.1 pgm/psidtopgm.c pgm/psidtopgm.1 \
  125.         pgm/fitstopgm.c pgm/fitstopgm.1
  126.     shar -v -c -p X pgm/pgmtopbm.c pgm/pgmtopbm.1 pgm/dithers.h pgm/tiff.h pgm/pgmtops.c pgm/pgmtops.1 pgm/psidtopgm.c pgm/psidtopgm.1 pgm/fitstopgm.c pgm/fitstopgm.1 > $@
  127. pgm.shar3:    pgm/pgmtofits.c pgm/pgmtofits.1 pgm/tifftopgm.c \
  128.         pgm/tifftopgm.1 pgm/rawtopgm.c pgm/rawtopgm.1 pgm/pgmhist.c \
  129.         pgm/pgmhist.1 pgm/pgmnorm.c pgm/pgmnorm.1
  130.     shar -v -c -p X pgm/pgmtofits.c pgm/pgmtofits.1 pgm/tifftopgm.c pgm/tifftopgm.1 pgm/rawtopgm.c pgm/rawtopgm.1 pgm/pgmhist.c pgm/pgmhist.1 pgm/pgmnorm.c pgm/pgmnorm.1 > $@
  131.  
  132. ppm.shar:    ppm.shar1 ppm.shar2 ppm.shar3 ppm.shar4 ppm.shar5 ppm.shar6 \
  133.         ppm.shar7
  134. ppm.shar1:    ppm/Makefile ppm/Imakefile ppm/ppm.5 ppm/libppm.3 \
  135.         ppm/libppm1.c ppm/libppm2.c ppm/libppm3.c ppm/libppm4.c \
  136.         ppm/libppm5.c ppm/convolscripts/ppmsmooth
  137.     shar -v -c -p X ppm/Makefile ppm/Imakefile ppm/ppm.5 ppm/libppm.3 ppm/libppm1.c ppm/libppm2.c ppm/libppm3.c ppm/libppm4.c ppm/libppm5.c ppm/convolscripts/ppmsmooth > $@
  138. ppm.shar2:    ppm/ppm.h ppm/ppmcmap.h ppm/ppmdraw.h ppm/libppm.h \
  139.         ppm/tga.h ppm/mtvtoppm.c ppm/mtvtoppm.1 ppm/giftoppm.c \
  140.         ppm/giftoppm.1 ppm/ppmrotate.c ppm/ppmrotate.1
  141.     shar -v -c -p X ppm/ppm.h ppm/ppmcmap.h ppm/ppmdraw.h ppm/libppm.h ppm/tga.h ppm/mtvtoppm.c ppm/mtvtoppm.1 ppm/giftoppm.c ppm/giftoppm.1 ppm/ppmrotate.c ppm/ppmrotate.1 > $@
  142. ppm.shar3:    ppm/ppmscale.c ppm/ppmscale.1 ppm/ppmshear.c \
  143.         ppm/ppmshear.1 ppm/ppmpat.c
  144.     shar -v -c -p X ppm/ppmscale.c ppm/ppmscale.1 ppm/ppmshear.c ppm/ppmshear.1 ppm/ppmpat.c > $@
  145. ppm.shar4:    ppm/ppmpat.1 ppm/ppmconvol.c ppm/ppmconvol.1 \
  146.         ppm/ppmtopgm.c ppm/ppmtopgm.1 ppm/ppmtorast.c ppm/ppmtorast.1 \
  147.         ppm/rasttoppm.c ppm/rasttoppm.1
  148.     shar -v -c -p X ppm/ppmpat.1 ppm/ppmconvol.c ppm/ppmconvol.1 ppm/ppmtopgm.c ppm/ppmtopgm.1 ppm/ppmtorast.c ppm/ppmtorast.1 ppm/rasttoppm.c ppm/rasttoppm.1 > $@
  149. ppm.shar5:    ppm/ppmcscale.c ppm/ppmcscale.1 ppm/ilbmtoppm.c \
  150.         ppm/ilbm.h ppm/ilbmtoppm.1 ppm/ppmquant.c ppm/ppmquant.1 \
  151.         ppm/ppmarith.c ppm/ppmarith.1
  152.     shar -v -c -p X ppm/ppmcscale.c ppm/ppmcscale.1 ppm/ilbmtoppm.c ppm/ilbm.h ppm/ilbmtoppm.1 ppm/ppmquant.c ppm/ppmquant.1 ppm/ppmarith.c ppm/ppmarith.1 > $@
  153. ppm.shar6:    ppm/qrttoppm.c ppm/qrttoppm.1 ppm/ppmtops.c \
  154.         ppm/ppmtops.1 ppm/ppmtogif.c ppm/ppmtogif.1 ppm/ppmtoilbm.c \
  155.         ppm/ppmtoilbm.1
  156.     shar -v -c -p X ppm/qrttoppm.c ppm/qrttoppm.1 ppm/ppmtops.c ppm/ppmtops.1 ppm/ppmtogif.c ppm/ppmtogif.1 ppm/ppmtoilbm.c ppm/ppmtoilbm.1 > $@
  157. ppm.shar7:    ppm/tgatoppm.c ppm/tgatoppm.1 ppm/ppmhist.c \
  158.         ppm/ppmhist.1 ppm/xwdtoppm.c ppm/xwdtoppm.1 ppm/ppmtoxwd.c \
  159.         ppm/ppmtoxwd.1 ppm/imgtoppm.c ppm/imgtoppm.1
  160.     shar -v -c -p X ppm/tgatoppm.c ppm/tgatoppm.1 ppm/ppmhist.c ppm/ppmhist.1 ppm/xwdtoppm.c ppm/xwdtoppm.1 ppm/ppmtoxwd.c ppm/ppmtoxwd.1 ppm/imgtoppm.c ppm/imgtoppm.1 > $@
  161.  
  162. pnm.shar:    pnm.shar1 pnm.shar2
  163. pnm.shar1:    pnm/Makefile pnm/Imakefile pnm/pnm.5 pnm/libpnm.3 \
  164.         pnm/libpnm1.c pnm/libpnm2.c pnm/libpnm3.c pnm/pnm.h \
  165.         pnm/pnmcat.c pnm/pnmcat.1 pnm/pnmcrop.c pnm/pnmcrop.1 \
  166.         pnm/pnmcut.c pnm/pnmcut.1
  167.     shar -v -c -p X pnm/Makefile pnm/Imakefile pnm/pnm.5 pnm/libpnm.3 pnm/libpnm1.c pnm/libpnm2.c pnm/libpnm3.c pnm/pnm.h pnm/pnmcat.c pnm/pnmcat.1 pnm/pnmcrop.c pnm/pnmcrop.1 pnm/pnmcut.c pnm/pnmcut.1 > $@
  168. pnm.shar2:    pnm/pnmenlarge.c pnm/pnmenlarge.1 pnm/pnmflip.c pnm/pnmflip.1 \
  169.         pnm/pnminvert.c pnm/pnminvert.1 pnm/pnmpaste.c pnm/pnmpaste.1 \
  170.         pnm/pnmtile.c pnm/pnmtile.1
  171.     shar -v -c -p X pnm/pnmflip.c pnm/pnmflip.1 pnm/pnminvert.c pnm/pnminvert.1 pnm/pnmpaste.c pnm/pnmpaste.1 pnm/pnmtile.c pnm/pnmtile.1 pnm/pnmenlarge.c pnm/pnmenlarge.1 > $@
  172.  
  173.  
  174. # Imakefile stuff.  Ignore if you're not an X11 type.
  175.  
  176.             TOP = ../../../../../usr/src/new/X11
  177.  
  178.              RM = rm -f
  179.              MV = mv
  180.         UTILSRC = $(TOP)/util
  181.        IMAKESRC = $(UTILSRC)/imake
  182.        IRULESRC = $(UTILSRC)/imake.includes
  183.           IMAKE = $(IMAKESRC)/imake
  184.   IMAKE_DEFINES =
  185.       IMAKE_CMD = $(NEWTOP)$(IMAKE) -TImake.tmpl -I$(NEWTOP)$(IRULESRC) \
  186.             -s Makefile $(IMAKE_DEFINES)
  187. Makefile: Imakefile
  188.     -@if [ -f Makefile ]; then \
  189.     echo "$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
  190.     $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  191.     else exit 0; fi
  192.     $(IMAKE_CMD) -DTOPDIR=$(TOP)
  193.  
  194. Makefiles:
  195.     @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
  196.     for i in $(SUBDIRS) ;\
  197.     do \
  198.     echo "Making Makefiles in $$i..."; \
  199.     make subdirMakefiles NEWTOP=../ MAKEFILE_SUBDIR=$$i;\
  200.     done
  201.  
  202. subdirMakefiles:
  203.     $(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
  204.     -@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then \
  205.     echo "$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak"; \
  206.     $(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
  207.     else exit 0; fi
  208.     cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=../$(TOP); \
  209.     make $(MFLAGS) Makefiles
  210.